package com.woniuxy.controller;

import com.woniuxy.service.MyLog;
import com.woniuxy.service.ProductService;
import com.woniuxy.service.StorageService;
import com.woniuxy.util.DataGridView;
import com.woniuxy.vo.ProductVo;
import com.woniuxy.vo.StorageVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StorageController {
    private Logger logger= LoggerFactory.getLogger(this.getClass());
    @Autowired
    private StorageService storageService;
    //库存表
    @MyLog(value = "查询库存表")  //这里添加了AOP的自定义注解
    @GetMapping("/storages")
    public DataGridView listStorageAll(StorageVo storageVo){
        storageVo.getProduct().setProdName(storageVo.getStorRemark());
        return storageService.selectCondition(storageVo);
    }

}
